import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' // 添加这行
import path from 'path'
import vueDevTools from 'vite-plugin-vue-devtools'
import  cesium from 'vite-plugin-cesium'
export default defineConfig({
  plugins: [vue(),vueDevTools(),cesium()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src')
    }
  },
  server: {
    host: '0.0.0.0',
    port: 3002,
    open: true,
    proxy: {
      '/api': {
        target: 'http://localhost:9998',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      }
    }
  }
})